package com.ajun.listener.dlx;

import com.ajun.common.rabbit.QueueConstants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * DLX 消费者
 *
 * @author LiJun
 * @date 2021-07-15
 */
@Slf4j
@Component
@RabbitListener(queues = {QueueConstants.DLX_QUEUE})
public class DlxListener {

    @RabbitHandler
    public void recvMessage(String message) {
        log.info("DLX 接收到订单信息(direct),orderId => {}", message);
        log.info("消费死信队列中的消息...存库...业务处理");
    }
}
